package com.czk.model.template.jdk8;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/8/23 11:38
 */
public class Client {
    public static void main(String[] args) {
        BankBusinessHandler bankBusinessHandler = new BankBusinessHandler();
        // 执行直接传入实现
        bankBusinessHandler.execute(a -> {
            System.out.println(100d);
        });
        //
        System.out.println("-================");
        BankBusinessHandler_2 bankBusinessHandler_2 = new BankBusinessHandler_2();
        bankBusinessHandler_2.execute(() -> ThreadLocalRandom.current().nextInt(), System.out::println);
    }
}
